package com.wangxianseng.file;

import java.util.List;

public class CheckUtil {

    public static Boolean checkFileName(List<String> types, String fileName) {
        if (fileName.lastIndexOf(".")!=fileName.indexOf(".")) {
            return false;
        }else{
            for (String type : types) {
                if (fileName.endsWith(type)) {
                    return true;
                }
            }
        }
        return false;
    }

}
